$panel-width: 324px;

.component-panel-wp {
  flex: none;
  z-index: 4;
  width: $panel-width !important;
  height: 100%;
  overflow: hidden;
  background: var(--datav-layer-wp-bg);
  box-shadow: 1px 0 #000;
  transition: width 0.3s ease;

  &.--hide {
    width: 45px !important;
  }

  .favorite-empty {
    padding: 10px;
    margin: 30px 0 0;
    font-size: 12px;
    color: #fff;
    text-align: center;
  }
}

.components-panel {
  position: relative;
  display: flex;
  width: $panel-width;
  height: 100%;
  overflow: hidden;
  transition: 0.3s ease;
  user-select: none;
  flex-direction: column;

  .panel-title {
    display: flex;
    height: 30px;
    padding: 10px;
    color: var(--datav-font-color);
    background: var(--datav-layer-bg);
    user-select: none;
    align-items: center;
    justify-content: space-between;

    .panel-text {
      flex: 1;
      display: flex;
      align-items: center;
      overflow: hidden;
    }

    .btn-icon {
      width: 22px;
      height: 20px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: 0.2s;

      &:hover {
        color: var(--datav-main-color);
      }
    }
  }

  .components-panel-wrapper {
    flex: 1;
    display: flex;
    position: relative;
    flex-direction: column;
    overflow: hidden;
  }

  .com-tab-icon {
    width: 18px;
    height: 18px;
    color: #fff;
    font-size: 18px;
    font-weight: normal;
  }

  .com-tab-title {
    font-size: 12px;
    width: 100%;
    line-height: 16px;
    color: var(--datav-font-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    font-weight: normal;
  }

  .el-tabs__item {
    height: auto;
    line-height: normal;
    padding: 14px 5px !important;

    &.is-left {
      text-align: center;
    }

    &.is-active {
      .com-tab-icon,
      .com-tab-title {
        color: var(--datav-main-color);
      }
    }
  }

  .el-tabs-l2 {
    .el-tabs__header {
      width: 60px;

      .el-tabs__nav-wrap {
        background: var(--datav-left-nav-active-bg);
      }
    }

    .el-tabs__active-bar {
      display: none;
    }

    .el-tabs__item {
      text-align: left !important;
      padding: 16px 7px !important;

      &.is-active {
        background: var(--datav-layer-bg-dark);
      }
    }
  }

  .components-single-menu-wp {
    background: var(--datav-layer-bg-dark);
    min-height: 100%;
  }

  .components-single-menu {
    padding: 16px;
    background: var(--datav-layer-bg-dark);
  }

  .components-single-menu-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .components-multi-menu {
    height: 100%;
    background: var(--datav-layer-bg-dark);
  }

  .components-item {
    cursor: pointer;
    display: inline-block;
    color: var(--datav-font-color);
    vertical-align: top;
    user-select: none;
    flex: none;
    margin-bottom: 16px;
    border-radius: 3px;
    box-sizing: border-box;
    overflow: hidden;
    position: relative;

    .components-item-text {
      font-size: 12px;
      padding: 0 5px;
      text-align: left;
      overflow: hidden;
      background: #212326;
      white-space: nowrap;
      text-overflow: ellipsis;
      line-height: 22px;
    }

    .components-item-img {
      overflow: hidden;
      width: 100%;
      background-clip: content-box;
      background-size: contain;
      background-repeat: no-repeat;
      background-position: center;
      background-color: #17191c;
      position: relative;
      text-align: center;
      box-sizing: content-box;
      transition: border-color 0.2s;
      height: 45px;
    }

    &.single {
      width: 47%;

      .components-item-img {
        height: 58px;
      }
    }

    &.double {
      width: 100%;

      .components-item-img {
        height: 72px;
      }
    }
  }
}
